-
Notifications
You must be signed in to change notification settings - Fork 156
Deprecate extraQueryParameters #1001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request deprecates the extraQueryParameters() method and its builder counterparts across all parameter classes in the MSAL4J SDK. The deprecation indicates that this feature is not recommended for production scenarios and will be removed in a future release, potentially to be replaced by a new API.
- Adds
@Deprecatedannotations to methods and builder methods - Adds consistent deprecation messages across all affected classes
- Updates the interface
IAcquireTokenParameterswhere the method is declared
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| IAcquireTokenParameters.java | Deprecates the extraQueryParameters() method in the interface |
| UserNamePasswordParameters.java | Deprecates getter and builder methods for extra query parameters |
| SilentParameters.java | Deprecates getter and builder methods for extra query parameters |
| RefreshTokenParameters.java | Deprecates getter and builder methods for extra query parameters |
| OnBehalfOfParameters.java | Deprecates getter and builder methods for extra query parameters |
| InteractiveRequestParameters.java | Deprecates getter and builder methods for extra query parameters |
| IntegratedWindowsAuthenticationParameters.java | Deprecates getter and builder methods for extra query parameters |
| DeviceCodeFlowParameters.java | Deprecates getter and builder methods for extra query parameters |
| ClientCredentialParameters.java | Deprecates getter and builder methods for extra query parameters |
| AuthorizationRequestUrlParameters.java | Deprecates getter and builder methods for extra query parameters |
| AuthorizationCodeParameters.java | Deprecates getter and builder methods for extra query parameters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** | ||
| * @deprecated Not recommended for production scenarios. It will be removed in a future release, and the behavior may be replaced by a new API. | ||
| */ | ||
| @Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this message be accompanied by the new API? I feel the message is a bit confusing if I am already using this API in production.
Deprecates the extraQueryParameters API according to KR 3310905, similar to what was done in MSAL.NET: AzureAD/microsoft-authentication-library-for-dotnet#5536
This API was meant for niche scenarios which the library did not explicitly cover, and not really meant for production. It can affect the contents and validity of tokens but were not used in our caching scheme which led to bad caching behavior: if the extra query parameters changed between requests we could return tokens that were not valid for the latest set of parameters.
Therefore we are deprecating the current API and, if there is a need for it, may add a new API in the future to perform similar behavior in a more robust way.